﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Mengsk.ProxyDelivery.Utls
{
    public class EnvironmentDirHelper
    {
        public static readonly string APP_PROGRAM_DIR = new System.IO.FileInfo(typeof(EnvironmentDirHelper).Assembly.Location).DirectoryName;
        public static readonly string QINIU_SHOPERP_DIR_LOG = System.IO.Path.Combine(APP_PROGRAM_DIR, "Log");
        public static readonly string QINIU_SHOPERP_DIR_CONFIG = System.IO.Path.Combine(APP_PROGRAM_DIR, "Config");
        public static readonly string QINIU_SHOPERP_DIR_DATA = System.IO.Path.Combine(APP_PROGRAM_DIR, "Data");
        /// <summary>
        /// 静态构造函数，创建相应目录
        /// </summary>
        static EnvironmentDirHelper()
        {
            if (System.IO.Directory.Exists(QINIU_SHOPERP_DIR_DATA) == false)
            {
                System.IO.Directory.CreateDirectory(QINIU_SHOPERP_DIR_DATA);
            }

            if (System.IO.Directory.Exists(QINIU_SHOPERP_DIR_LOG) == false)
            {
                System.IO.Directory.CreateDirectory(QINIU_SHOPERP_DIR_LOG);
            }

            if (System.IO.Directory.Exists(QINIU_SHOPERP_DIR_CONFIG) == false)
            {
                System.IO.Directory.CreateDirectory(QINIU_SHOPERP_DIR_CONFIG);
            }
        }

    }

}
